Integrand size = 36, antiderivative size = 291 \[ \int \frac {(a+i a \tan (c+d x))^n (A+B \tan (c+d x))}{\cot ^{\frac {3}{2}}(c+d x)} \, dx=\frac {2 B (a+i a \tan (c+d x))^n}{d (3+2 n) \cot ^{\frac {3}{2}}(c+d x)}-\frac {2 (2 i B n-A (3+2 n)) (a+i a \tan (c+d x))^n}{d (1+2 n) (3+2 n) \sqrt {\cot (c+d x)}}-\frac {2 (A-i B) \operatorname {AppellF1}\left (\frac {1}{2},1-n,1,\frac {3}{2},-i \tan (c+d x),i \tan (c+d x)\right ) (1+i \tan (c+d x))^{-n} (a+i a \tan (c+d x))^n}{d \sqrt {\cot (c+d x)}}+\frac {2 \left (2 A n (3+2 n)-i B \left (3+6 n+4 n^2\right )\right ) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},1-n,\frac {3}{2},-i \tan (c+d x)\right ) (1+i \tan (c+d x))^{-n} (a+i a \tan (c+d x))^n}{d (1+2 n) (3+2 n) \sqrt {\cot (c+d x)}} \]
2*B*(a+I*a*tan(d*x+c))^n/d/(3+2*n)/cot(d*x+c)^(3/2)-2*(2*I*B*n-A*(3+2*n))* (a+I*a*tan(d*x+c))^n/d/(4*n^2+8*n+3)/cot(d*x+c)^(1/2)-2*(A-I*B)*AppellF1(1 /2,1-n,1,3/2,-I*tan(d*x+c),I*tan(d*x+c))*(a+I*a*tan(d*x+c))^n/d/cot(d*x+c) ^(1/2)/((1+I*tan(d*x+c))^n)+2*(2*A*n*(3+2*n)-I*B*(4*n^2+6*n+3))*hypergeom( [1/2, 1-n],[3/2],-I*tan(d*x+c))*(a+I*a*tan(d*x+c))^n/d/(4*n^2+8*n+3)/cot(d *x+c)^(1/2)/((1+I*tan(d*x+c))^n)
\[ \int \frac {(a+i a \tan (c+d x))^n (A+B \tan (c+d x))}{\cot ^{\frac {3}{2}}(c+d x)} \, dx=\int \frac {(a+i a \tan (c+d x))^n (A+B \tan (c+d x))}{\cot ^{\frac {3}{2}}(c+d x)} \, dx \]
Time = 1.67 (sec) , antiderivative size = 351, normalized size of antiderivative = 1.21, number of steps used = 22, number of rules used = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.583, Rules used = {3042, 4729, 3042, 4080, 27, 3042, 4080, 27, 3042, 4084, 3042, 4047, 25, 27, 148, 27, 334, 333, 4082, 76, 74}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {(a+i a \tan (c+d x))^n (A+B \tan (c+d x))}{\cot ^{\frac {3}{2}}(c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a+i a \tan (c+d x))^n (A+B \tan (c+d x))}{\cot (c+d x)^{3/2}}dx\) |
\(\Big \downarrow \) 4729 |
\(\displaystyle \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \int \tan ^{\frac {3}{2}}(c+d x) (i \tan (c+d x) a+a)^n (A+B \tan (c+d x))dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \int \tan (c+d x)^{3/2} (i \tan (c+d x) a+a)^n (A+B \tan (c+d x))dx\) |
\(\Big \downarrow \) 4080 |
\(\displaystyle \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \left (\frac {2 \int -\frac {1}{2} \sqrt {\tan (c+d x)} (i \tan (c+d x) a+a)^n (3 a B+a (2 i B n-A (2 n+3)) \tan (c+d x))dx}{a (2 n+3)}+\frac {2 B \tan ^{\frac {3}{2}}(c+d x) (a+i a \tan (c+d x))^n}{d (2 n+3)}\right )\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \left (\frac {2 B \tan ^{\frac {3}{2}}(c+d x) (a+i a \tan (c+d x))^n}{d (2 n+3)}-\frac {\int \sqrt {\tan (c+d x)} (i \tan (c+d x) a+a)^n (3 a B+a (2 i B n-A (2 n+3)) \tan (c+d x))dx}{a (2 n+3)}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \left (\frac {2 B \tan ^{\frac {3}{2}}(c+d x) (a+i a \tan (c+d x))^n}{d (2 n+3)}-\frac {\int \sqrt {\tan (c+d x)} (i \tan (c+d x) a+a)^n (3 a B+a (2 i B n-A (2 n+3)) \tan (c+d x))dx}{a (2 n+3)}\right )\) |
\(\Big \downarrow \) 4080 |
\(\displaystyle \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \left (\frac {2 B \tan ^{\frac {3}{2}}(c+d x) (a+i a \tan (c+d x))^n}{d (2 n+3)}-\frac {\frac {2 \int -\frac {(i \tan (c+d x) a+a)^n \left (a^2 (2 i B n-A (2 n+3))-a^2 \left (2 i A n (2 n+3)+B \left (4 n^2+6 n+3\right )\right ) \tan (c+d x)\right )}{2 \sqrt {\tan (c+d x)}}dx}{a (2 n+1)}+\frac {2 a (-A (2 n+3)+2 i B n) \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n}{d (2 n+1)}}{a (2 n+3)}\right )\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \left (\frac {2 B \tan ^{\frac {3}{2}}(c+d x) (a+i a \tan (c+d x))^n}{d (2 n+3)}-\frac {\frac {2 a (-A (2 n+3)+2 i B n) \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n}{d (2 n+1)}-\frac {\int \frac {(i \tan (c+d x) a+a)^n \left (a^2 (2 i B n-A (2 n+3))-a^2 \left (2 i A n (2 n+3)+B \left (4 n^2+6 n+3\right )\right ) \tan (c+d x)\right )}{\sqrt {\tan (c+d x)}}dx}{a (2 n+1)}}{a (2 n+3)}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \left (\frac {2 B \tan ^{\frac {3}{2}}(c+d x) (a+i a \tan (c+d x))^n}{d (2 n+3)}-\frac {\frac {2 a (-A (2 n+3)+2 i B n) \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n}{d (2 n+1)}-\frac {\int \frac {(i \tan (c+d x) a+a)^n \left (a^2 (2 i B n-A (2 n+3))-a^2 \left (2 i A n (2 n+3)+B \left (4 n^2+6 n+3\right )\right ) \tan (c+d x)\right )}{\sqrt {\tan (c+d x)}}dx}{a (2 n+1)}}{a (2 n+3)}\right )\) |
\(\Big \downarrow \) 4084 |
\(\displaystyle \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \left (\frac {2 B \tan ^{\frac {3}{2}}(c+d x) (a+i a \tan (c+d x))^n}{d (2 n+3)}-\frac {\frac {2 a (-A (2 n+3)+2 i B n) \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n}{d (2 n+1)}-\frac {a \left (2 A n (2 n+3)-i B \left (4 n^2+6 n+3\right )\right ) \int \frac {(a-i a \tan (c+d x)) (i \tan (c+d x) a+a)^n}{\sqrt {\tan (c+d x)}}dx-a^2 \left (4 n^2+8 n+3\right ) (A-i B) \int \frac {(i \tan (c+d x) a+a)^n}{\sqrt {\tan (c+d x)}}dx}{a (2 n+1)}}{a (2 n+3)}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \left (\frac {2 B \tan ^{\frac {3}{2}}(c+d x) (a+i a \tan (c+d x))^n}{d (2 n+3)}-\frac {\frac {2 a (-A (2 n+3)+2 i B n) \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n}{d (2 n+1)}-\frac {a \left (2 A n (2 n+3)-i B \left (4 n^2+6 n+3\right )\right ) \int \frac {(a-i a \tan (c+d x)) (i \tan (c+d x) a+a)^n}{\sqrt {\tan (c+d x)}}dx-a^2 \left (4 n^2+8 n+3\right ) (A-i B) \int \frac {(i \tan (c+d x) a+a)^n}{\sqrt {\tan (c+d x)}}dx}{a (2 n+1)}}{a (2 n+3)}\right )\) |
\(\Big \downarrow \) 4047 |
\(\displaystyle \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \left (\frac {2 B \tan ^{\frac {3}{2}}(c+d x) (a+i a \tan (c+d x))^n}{d (2 n+3)}-\frac {\frac {2 a (-A (2 n+3)+2 i B n) \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n}{d (2 n+1)}-\frac {a \left (2 A n (2 n+3)-i B \left (4 n^2+6 n+3\right )\right ) \int \frac {(a-i a \tan (c+d x)) (i \tan (c+d x) a+a)^n}{\sqrt {\tan (c+d x)}}dx-\frac {i a^4 \left (4 n^2+8 n+3\right ) (A-i B) \int -\frac {(i \tan (c+d x) a+a)^{n-1}}{a \sqrt {\tan (c+d x)} (a-i a \tan (c+d x))}d(i a \tan (c+d x))}{d}}{a (2 n+1)}}{a (2 n+3)}\right )\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \left (\frac {2 B \tan ^{\frac {3}{2}}(c+d x) (a+i a \tan (c+d x))^n}{d (2 n+3)}-\frac {\frac {2 a (-A (2 n+3)+2 i B n) \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n}{d (2 n+1)}-\frac {\frac {i a^4 \left (4 n^2+8 n+3\right ) (A-i B) \int \frac {(i \tan (c+d x) a+a)^{n-1}}{a \sqrt {\tan (c+d x)} (a-i a \tan (c+d x))}d(i a \tan (c+d x))}{d}+a \left (2 A n (2 n+3)-i B \left (4 n^2+6 n+3\right )\right ) \int \frac {(a-i a \tan (c+d x)) (i \tan (c+d x) a+a)^n}{\sqrt {\tan (c+d x)}}dx}{a (2 n+1)}}{a (2 n+3)}\right )\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \left (\frac {2 B \tan ^{\frac {3}{2}}(c+d x) (a+i a \tan (c+d x))^n}{d (2 n+3)}-\frac {\frac {2 a (-A (2 n+3)+2 i B n) \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n}{d (2 n+1)}-\frac {\frac {i a^3 \left (4 n^2+8 n+3\right ) (A-i B) \int \frac {(i \tan (c+d x) a+a)^{n-1}}{\sqrt {\tan (c+d x)} (a-i a \tan (c+d x))}d(i a \tan (c+d x))}{d}+a \left (2 A n (2 n+3)-i B \left (4 n^2+6 n+3\right )\right ) \int \frac {(a-i a \tan (c+d x)) (i \tan (c+d x) a+a)^n}{\sqrt {\tan (c+d x)}}dx}{a (2 n+1)}}{a (2 n+3)}\right )\) |
\(\Big \downarrow \) 148 |
\(\displaystyle \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \left (\frac {2 B \tan ^{\frac {3}{2}}(c+d x) (a+i a \tan (c+d x))^n}{d (2 n+3)}-\frac {\frac {2 a (-A (2 n+3)+2 i B n) \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n}{d (2 n+1)}-\frac {a \left (2 A n (2 n+3)-i B \left (4 n^2+6 n+3\right )\right ) \int \frac {(a-i a \tan (c+d x)) (i \tan (c+d x) a+a)^n}{\sqrt {\tan (c+d x)}}dx-\frac {2 a^4 \left (4 n^2+8 n+3\right ) (A-i B) \int \frac {\left (a-i a^3 \tan ^2(c+d x)\right )^{n-1}}{a \left (i a^2 \tan ^2(c+d x)+1\right )}d\sqrt {\tan (c+d x)}}{d}}{a (2 n+1)}}{a (2 n+3)}\right )\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \left (\frac {2 B \tan ^{\frac {3}{2}}(c+d x) (a+i a \tan (c+d x))^n}{d (2 n+3)}-\frac {\frac {2 a (-A (2 n+3)+2 i B n) \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n}{d (2 n+1)}-\frac {a \left (2 A n (2 n+3)-i B \left (4 n^2+6 n+3\right )\right ) \int \frac {(a-i a \tan (c+d x)) (i \tan (c+d x) a+a)^n}{\sqrt {\tan (c+d x)}}dx-\frac {2 a^3 \left (4 n^2+8 n+3\right ) (A-i B) \int \frac {\left (a-i a^3 \tan ^2(c+d x)\right )^{n-1}}{i a^2 \tan ^2(c+d x)+1}d\sqrt {\tan (c+d x)}}{d}}{a (2 n+1)}}{a (2 n+3)}\right )\) |
\(\Big \downarrow \) 334 |
\(\displaystyle \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \left (\frac {2 B \tan ^{\frac {3}{2}}(c+d x) (a+i a \tan (c+d x))^n}{d (2 n+3)}-\frac {\frac {2 a (-A (2 n+3)+2 i B n) \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n}{d (2 n+1)}-\frac {a \left (2 A n (2 n+3)-i B \left (4 n^2+6 n+3\right )\right ) \int \frac {(a-i a \tan (c+d x)) (i \tan (c+d x) a+a)^n}{\sqrt {\tan (c+d x)}}dx-\frac {2 a^2 \left (4 n^2+8 n+3\right ) (A-i B) \left (1-i a^2 \tan ^2(c+d x)\right )^{-n} \left (a-i a^3 \tan ^2(c+d x)\right )^n \int \frac {\left (1-i a^2 \tan ^2(c+d x)\right )^{n-1}}{i a^2 \tan ^2(c+d x)+1}d\sqrt {\tan (c+d x)}}{d}}{a (2 n+1)}}{a (2 n+3)}\right )\) |
\(\Big \downarrow \) 333 |
\(\displaystyle \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \left (\frac {2 B \tan ^{\frac {3}{2}}(c+d x) (a+i a \tan (c+d x))^n}{d (2 n+3)}-\frac {\frac {2 a (-A (2 n+3)+2 i B n) \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n}{d (2 n+1)}-\frac {a \left (2 A n (2 n+3)-i B \left (4 n^2+6 n+3\right )\right ) \int \frac {(a-i a \tan (c+d x)) (i \tan (c+d x) a+a)^n}{\sqrt {\tan (c+d x)}}dx-\frac {2 i a^3 \left (4 n^2+8 n+3\right ) (A-i B) \tan (c+d x) \left (1-i a^2 \tan ^2(c+d x)\right )^{-n} \left (a-i a^3 \tan ^2(c+d x)\right )^n \operatorname {AppellF1}\left (\frac {1}{2},1,1-n,\frac {3}{2},-i a^2 \tan ^2(c+d x),i a^2 \tan ^2(c+d x)\right )}{d}}{a (2 n+1)}}{a (2 n+3)}\right )\) |
\(\Big \downarrow \) 4082 |
\(\displaystyle \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \left (\frac {2 B \tan ^{\frac {3}{2}}(c+d x) (a+i a \tan (c+d x))^n}{d (2 n+3)}-\frac {\frac {2 a (-A (2 n+3)+2 i B n) \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n}{d (2 n+1)}-\frac {\frac {a^3 \left (2 A n (2 n+3)-i B \left (4 n^2+6 n+3\right )\right ) \int \frac {(i \tan (c+d x) a+a)^{n-1}}{\sqrt {\tan (c+d x)}}d\tan (c+d x)}{d}-\frac {2 i a^3 \left (4 n^2+8 n+3\right ) (A-i B) \tan (c+d x) \left (1-i a^2 \tan ^2(c+d x)\right )^{-n} \left (a-i a^3 \tan ^2(c+d x)\right )^n \operatorname {AppellF1}\left (\frac {1}{2},1,1-n,\frac {3}{2},-i a^2 \tan ^2(c+d x),i a^2 \tan ^2(c+d x)\right )}{d}}{a (2 n+1)}}{a (2 n+3)}\right )\) |
\(\Big \downarrow \) 76 |
\(\displaystyle \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \left (\frac {2 B \tan ^{\frac {3}{2}}(c+d x) (a+i a \tan (c+d x))^n}{d (2 n+3)}-\frac {\frac {2 a (-A (2 n+3)+2 i B n) \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n}{d (2 n+1)}-\frac {\frac {a^2 \left (2 A n (2 n+3)-i B \left (4 n^2+6 n+3\right )\right ) (1+i \tan (c+d x))^{-n} (a+i a \tan (c+d x))^n \int \frac {(i \tan (c+d x)+1)^{n-1}}{\sqrt {\tan (c+d x)}}d\tan (c+d x)}{d}-\frac {2 i a^3 \left (4 n^2+8 n+3\right ) (A-i B) \tan (c+d x) \left (1-i a^2 \tan ^2(c+d x)\right )^{-n} \left (a-i a^3 \tan ^2(c+d x)\right )^n \operatorname {AppellF1}\left (\frac {1}{2},1,1-n,\frac {3}{2},-i a^2 \tan ^2(c+d x),i a^2 \tan ^2(c+d x)\right )}{d}}{a (2 n+1)}}{a (2 n+3)}\right )\) |
\(\Big \downarrow \) 74 |
\(\displaystyle \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \left (\frac {2 B \tan ^{\frac {3}{2}}(c+d x) (a+i a \tan (c+d x))^n}{d (2 n+3)}-\frac {\frac {2 a (-A (2 n+3)+2 i B n) \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^n}{d (2 n+1)}-\frac {\frac {2 a^2 \left (2 A n (2 n+3)-i B \left (4 n^2+6 n+3\right )\right ) \sqrt {\tan (c+d x)} (1+i \tan (c+d x))^{-n} (a+i a \tan (c+d x))^n \operatorname {Hypergeometric2F1}\left (\frac {1}{2},1-n,\frac {3}{2},-i \tan (c+d x)\right )}{d}-\frac {2 i a^3 \left (4 n^2+8 n+3\right ) (A-i B) \tan (c+d x) \left (1-i a^2 \tan ^2(c+d x)\right )^{-n} \left (a-i a^3 \tan ^2(c+d x)\right )^n \operatorname {AppellF1}\left (\frac {1}{2},1,1-n,\frac {3}{2},-i a^2 \tan ^2(c+d x),i a^2 \tan ^2(c+d x)\right )}{d}}{a (2 n+1)}}{a (2 n+3)}\right )\) |
Sqrt[Cot[c + d*x]]*Sqrt[Tan[c + d*x]]*((2*B*Tan[c + d*x]^(3/2)*(a + I*a*Ta n[c + d*x])^n)/(d*(3 + 2*n)) - ((2*a*((2*I)*B*n - A*(3 + 2*n))*Sqrt[Tan[c + d*x]]*(a + I*a*Tan[c + d*x])^n)/(d*(1 + 2*n)) - ((2*a^2*(2*A*n*(3 + 2*n) - I*B*(3 + 6*n + 4*n^2))*Hypergeometric2F1[1/2, 1 - n, 3/2, (-I)*Tan[c + d*x]]*Sqrt[Tan[c + d*x]]*(a + I*a*Tan[c + d*x])^n)/(d*(1 + I*Tan[c + d*x]) ^n) - ((2*I)*a^3*(A - I*B)*(3 + 8*n + 4*n^2)*AppellF1[1/2, 1, 1 - n, 3/2, (-I)*a^2*Tan[c + d*x]^2, I*a^2*Tan[c + d*x]^2]*Tan[c + d*x]*(a - I*a^3*Tan [c + d*x]^2)^n)/(d*(1 - I*a^2*Tan[c + d*x]^2)^n))/(a*(1 + 2*n)))/(a*(3 + 2 *n)))
3.6.72.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[c^n*((b*x )^(m + 1)/(b*(m + 1)))*Hypergeometric2F1[-n, m + 1, m + 2, (-d)*(x/c)], x] /; FreeQ[{b, c, d, m, n}, x] && !IntegerQ[m] && (IntegerQ[n] || (GtQ[c, 0] && !(EqQ[n, -2^(-1)] && EqQ[c^2 - d^2, 0] && GtQ[-d/(b*c), 0])))
Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[c^IntPart [n]*((c + d*x)^FracPart[n]/(1 + d*(x/c))^FracPart[n]) Int[(b*x)^m*(1 + d* (x/c))^n, x], x] /; FreeQ[{b, c, d, m, n}, x] && !IntegerQ[m] && !Integer Q[n] && !GtQ[c, 0] && !GtQ[-d/(b*c), 0] && ((RationalQ[m] && !(EqQ[n, -2 ^(-1)] && EqQ[c^2 - d^2, 0])) || !RationalQ[n])
Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_.)*((e_) + (f_.)*(x_))^(p_.), x_] :> With[{k = Denominator[m]}, Simp[k/b Subst[Int[x^(k*(m + 1) - 1)*(c + d*(x^k/b))^n*(e + f*(x^k/b))^p, x], x, (b*x)^(1/k)], x]] /; FreeQ[{b, c, d, e, f, n, p}, x] && FractionQ[m] && IntegerQ[p]
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Sim p[a^p*c^q*x*AppellF1[1/2, -p, -q, 3/2, (-b)*(x^2/a), (-d)*(x^2/c)], x] /; F reeQ[{a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0] && (IntegerQ[p] || GtQ[a, 0]) && (IntegerQ[q] || GtQ[c, 0])
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Sim p[a^IntPart[p]*((a + b*x^2)^FracPart[p]/(1 + b*(x^2/a))^FracPart[p]) Int[ (1 + b*(x^2/a))^p*(c + d*x^2)^q, x], x] /; FreeQ[{a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0] && !(IntegerQ[p] || GtQ[a, 0])
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[a*(b/f) Subst[Int[(a + x)^(m - 1)*(( c + (d/b)*x)^n/(b^2 + a*x)), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[c^2 + d ^2, 0]
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim p[B*(a + b*Tan[e + f*x])^m*((c + d*Tan[e + f*x])^n/(f*(m + n))), x] + Simp[ 1/(a*(m + n)) Int[(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^(n - 1)*Sim p[a*A*c*(m + n) - B*(b*c*m + a*d*n) + (a*A*d*(m + n) - B*(b*d*m - a*c*n))*T an[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && GtQ[n, 0]
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim p[b*(B/f) Subst[Int[(a + b*x)^(m - 1)*(c + d*x)^n, x], x, Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[ a^2 + b^2, 0] && EqQ[A*b + a*B, 0]
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim p[(A*b + a*B)/b Int[(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^n, x], x] - Simp[B/b Int[(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^n*(a - b*Tan[ e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[A*b + a*B, 0]
Int[(cot[(a_.) + (b_.)*(x_)]*(c_.))^(m_.)*(u_), x_Symbol] :> Simp[(c*Cot[a + b*x])^m*(c*Tan[a + b*x])^m Int[ActivateTrig[u]/(c*Tan[a + b*x])^m, x], x] /; FreeQ[{a, b, c, m}, x] && !IntegerQ[m] && KnownTangentIntegrandQ[u, x]
\[\int \frac {\left (a +i a \tan \left (d x +c \right )\right )^{n} \left (A +B \tan \left (d x +c \right )\right )}{\cot \left (d x +c \right )^{\frac {3}{2}}}d x\]
\[ \int \frac {(a+i a \tan (c+d x))^n (A+B \tan (c+d x))}{\cot ^{\frac {3}{2}}(c+d x)} \, dx=\int { \frac {{\left (B \tan \left (d x + c\right ) + A\right )} {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{n}}{\cot \left (d x + c\right )^{\frac {3}{2}}} \,d x } \]
integral(-((A - I*B)*e^(6*I*d*x + 6*I*c) - (A - 3*I*B)*e^(4*I*d*x + 4*I*c) - (A + 3*I*B)*e^(2*I*d*x + 2*I*c) + A + I*B)*(2*a*e^(2*I*d*x + 2*I*c)/(e^ (2*I*d*x + 2*I*c) + 1))^n*sqrt((I*e^(2*I*d*x + 2*I*c) + I)/(e^(2*I*d*x + 2 *I*c) - 1))/(e^(6*I*d*x + 6*I*c) + 3*e^(4*I*d*x + 4*I*c) + 3*e^(2*I*d*x + 2*I*c) + 1), x)
\[ \int \frac {(a+i a \tan (c+d x))^n (A+B \tan (c+d x))}{\cot ^{\frac {3}{2}}(c+d x)} \, dx=\int \frac {\left (i a \left (\tan {\left (c + d x \right )} - i\right )\right )^{n} \left (A + B \tan {\left (c + d x \right )}\right )}{\cot ^{\frac {3}{2}}{\left (c + d x \right )}}\, dx \]
\[ \int \frac {(a+i a \tan (c+d x))^n (A+B \tan (c+d x))}{\cot ^{\frac {3}{2}}(c+d x)} \, dx=\int { \frac {{\left (B \tan \left (d x + c\right ) + A\right )} {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{n}}{\cot \left (d x + c\right )^{\frac {3}{2}}} \,d x } \]
\[ \int \frac {(a+i a \tan (c+d x))^n (A+B \tan (c+d x))}{\cot ^{\frac {3}{2}}(c+d x)} \, dx=\int { \frac {{\left (B \tan \left (d x + c\right ) + A\right )} {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{n}}{\cot \left (d x + c\right )^{\frac {3}{2}}} \,d x } \]
Timed out. \[ \int \frac {(a+i a \tan (c+d x))^n (A+B \tan (c+d x))}{\cot ^{\frac {3}{2}}(c+d x)} \, dx=\int \frac {\left (A+B\,\mathrm {tan}\left (c+d\,x\right )\right )\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^n}{{\mathrm {cot}\left (c+d\,x\right )}^{3/2}} \,d x \]